//
//  ICLoginTextField.m
//  ICome
//
//  Created by ENN on 16/6/1.
//  Copyright © 2016年 iCom. All rights reserved.
//

#import "ICLoginTextField.h"
#import "ICHeaderFile.h"

@implementation ICLoginTextField

- (instancetype)initWithFrame:(CGRect)frame
                  placeholder:(NSString *)placeholder
{
    if (self = [super initWithFrame:frame]) {
        self.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName:ICRGB(0xa9a9a9),NSFontAttributeName:[UIFont systemFontOfSize:22]}];
        self.backgroundColor = [UIColor clearColor];
//        UIImageView *rightView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 22., 22.)];
//        rightView.backgroundColor = [UIColor redColor];
//        self.rightView = rightView;
//        self.rightViewMode = UITextFieldViewModeWhileEditing;
        self.clearButtonMode = UITextFieldViewModeWhileEditing;
        [self setAutocorrectionType:UITextAutocorrectionTypeNo];// 联想
        [self setAutocapitalizationType:UITextAutocapitalizationTypeNone];// 大写
        
    }
    return self;
}

@end
